@echo off
for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i
for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i
for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i
for /f %%i in ('time /t') do set DATE_TIME=%%i
for /f %%i in ('echo %date_time::=-%') do set DATE_TIME=%%i
rem Killing all files older than a week old...
forfiles /D -8 /M *.zip /C "cmd /c del @fname.zip"
"C:\AppServ\MySQL\bin\mysqldump" -u developer -p"helpdesk" pos >d:\mysqlbackup\%DATE_DAY%_%DATE_TIME%_pos.sql
wzzip d:\mysqlbackup\%DATE_DAY%_%DATE_TIME%_pos.zip d:\mysqlbackup\%DATE_DAY%_%DATE_TIME%_pos.sql -mex



